

////////////////////////////////////////////////////////////
//  ESS System Information
////////////////////////////////////////////////////////////
#define _ESS_Version_							0x011E  //30=0x1E  ,version 30.1  		//2bytes
#define _ESS_Serial_Num_          68    		//2bytes

#define _ADG8_System_DSG_RefVol_ADC_            1801//ADG8_SystemRefVol_ADC  1833 = 1.1V ; 2bytes
#define _ADG8_System_CHG_RefVol_ADC_            1800//ADG8_SystemRefVol_ADC  1833 = 1.1V ; 2bytes
#define _ADG8_SystemOffDSGCurrentTh_ADC_       	2502//ADG8_SystemOffDSGCurrentTh_ADC  2213 =-10A (> 1.1V) ; 2bytes
#define _ADG8_SystemOffCHGCurrentTh_ADC_       	1112//ADG8_SystemOffCHGCurrentTh_ADC  1529 = 8A (< 1.1V) ; 2bytes          
#define _ADG8_System_DSG_Factor_                0.0255f//ADG8_System factor adc/mA ; 4bytes
#define _ADG8_System_CHG_Factor_                0.0255f//ADG8_System factor adc/mA ; 4bytes
//////////////////////////////////////////////////////////
// OPA2376, 
// gain : 140K/1K, getting current range 7.5A ~ -7.5A (for refrernce 2.5V ADC)
// 1A ~= 540 ADC codes, 0.5A ~= 270 ADC codes.
// getCHGCurrent() & getDSGCurrent();
//////////////////////////////////////////////////////////

#define _OPA_SystemDSGCurrentTh_ADC_            206	//OPA_SystemDSGCurrentTh_ADC  273 = 0.5A ; 2bytes
#define _OPA_SystemCHGCurrentTh_ADC_            206	//OPA_SystemCHGCurrentTh_ADC  273 = 0.5A ; 2bytes
#define _OPA_SystemDSGCurrentOffset_ADC_        0	//_OPA_SystemDSGCurrentOffset_ADC_  273 = 0.5A ; 2bytes
#define _OPA_SystemCHGCurrentOffset_ADC_        0	//_OPA_SystemCHGCurrentOffset_ADC_  273 = 0.5A ; 2bytes
#define _OPA_System_DSG_Factor_                 0.41225f//_OPA__System factor adc/mA ; 4bytes
#define _OPA_System_CHG_Factor_                 0.413f//_OPA__System factor adc/mA ; 4bytes

//Slave address: 11 
//Data read from MCU Calibration Flash device:
//Calibration_Completion_Status_Offset   : 17
//Calibration_Times_Offset               : 1
//Cal_Date_Year_Offset                   : 2012
//Cal_Date_Month_Offset                  : 4
//Cal_Date_Day_Offset                    : 24
//Cal_Date_24Hour_Offset                 : 0
//Cal_Date_Minute_Offset                 : 3
//Cal_Second_DSG_Current_mA_Offset       : 5000
//Cal_Second_DSG_Current_ADG8_ADC_Offset : 1946
//Cal_Second_DSG_Current_OPA_ADC_Offset  : 2209
//Cal_First_DSG_Current_mA_Offset        : 1000
//Cal_First_DSG_Current_ADG8_ADC_Offset  : 1838
//Cal_First_DSG_Current_OPA_ADC_Offset   : 469
//Cal_Zero_Current_mA_Offset             : 0
//Cal_Zero_Current_ADG8_ADC_Offset       : 1833
//Cal_Zero_Current_OPA_ADC_Offset        : 0
//Cal_First_CHG_Current_mA_Offset        : 1000
//Cal_First_CHG_Current_ADG8_ADC_Offset  : 1784
//Cal_First_CHG_Current_OPA_ADC_Offset   : 315
//Cal_Second_CHG_Current_mA_Offset       : 5000
//Cal_Second_CHG_Current_ADG8_ADC_Offset : 1677
//Cal_Second_CHG_Current_OPA_ADC_Offset  : 2052
//ADG8_System_DSG_RefVol_ADC_offset      : 1811
//ADG8_System_CHG_RefVol_ADC_offset      : 1810
//ADG8_SystemOffDSGCurrentTh_ADC_offset  : 2553
//ADG8_SystemOffCHGCurrentTh_ADC_offset  : 1088
//ADG8_System_DSG_Factor_offset          : 0.027
//ADG8_System_CHG_Factor_offset          : 0.02675
//OPA_SystemDSGCurrentTh_ADC_offset      : 251
//OPA_SystemCHGCurrentTh_ADC_offset      : 217
//OPA_SystemDSGCurrentOffset_ADC_offset  : 34
//OPA_SystemCHGCurrentOffset_ADC_offset  : 0
//OPA_System_DSG_Factor_offset           : 0.435
//OPA_System_CHG_Factor_offset           : 0.43425
